﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using FinalPointSet.Model.Util;
using FinalPointSet.View;
using FinalPointSet.View.Page.MainView;
using System.Diagnostics;

namespace FinalPointSet.ViewModel
{
    public partial class MainViewModel : ObservableObject
    {
        #region 状态栏按钮事件
        /// <summary>
        /// 退出程序
        /// </summary>
        [RelayCommand]
        private static void Exit()
        {
            Debug.Print("MainViewModel.Exit()");
            WindowUtil.Instance.Close(typeof(MainView));
            PageUtil.RemoveAll();
        }

        /// <summary>
        /// 最小化
        /// </summary>
        [RelayCommand]
        private static void Minimize()
        {
            Debug.Print("MainViewModel.Minimize()");
            WindowUtil.Instance.Hide(typeof(MainView));
        }

        /// <summary>
        /// 最大化
        /// </summary>
        [RelayCommand]
        private static void Maximized()
        {
            Debug.Print("MainViewModel.Maximized()");
            WindowUtil.Instance.Maximized(typeof(MainView));
        }
        #endregion
    }
}
